import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:stroke_text/stroke_text.dart';
class MSPostPage extends StatefulWidget{
  final int month;
  const MSPostPage({super.key, required this.month});

  @override
  State<StatefulWidget> createState() {
    return _MSPostPageState();
  }

}

class _MSPostPageState extends State<MSPostPage>{
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Color(0xFF148857),
      body:SizedBox.expand(
        child: Stack(children: [
          Positioned(left: 0,right: 0,top: ScreenUtil().statusBarHeight,bottom: 0,child: Image.asset("images/mile-stone-post-bg.png",fit: BoxFit.fitWidth,),),
          Positioned(left: 0,right: 0,top: ScreenUtil().statusBarHeight,bottom: 0,
              child:Column(
                crossAxisAlignment: CrossAxisAlignment.start,
            children: [
               Padding(padding: EdgeInsets.only(top: 32.w,left: 24.w),child: InkWell(
                 onTap: (){
                   Navigator.of(context).pop();
                 },
                 child: Image.asset("images/back.png",width: 25.w,fit: BoxFit.fitWidth,),
               ),),
              Padding(padding: EdgeInsets.only(top: 12.w),
              child: SizedBox(width: double.infinity, child: Row(
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  StrokeText(text:"Things I want to record",strokeWidth: 2.w,strokeColor: Color(0xFF065F39),
                    textStyle: TextStyle(
                        fontSize: 25.sp,
                        fontWeight: FontWeight.bold,
                        color: Colors.white
                    ),
                  )
                ],
              ),),
              ),
              Padding(padding: EdgeInsets.only(left: 24.w,right: 24.w,top: 73.w),
              child: Container(
                width: 327.w,
                height: 451.w,
                decoration: const BoxDecoration(
                  image: DecorationImage(
                    image: AssetImage("images/post-bg.png")
                  )
                ),
                padding: EdgeInsets.only(left: 44.w,right: 40.w,top: 97.w,bottom: 107.w),
                child: Column(
                  children: [
                    Row(
                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
                      children: [
                        InkWell(
                          onTap: (){
                            Navigator.of(context).pushReplacementNamed("/post-text",arguments: widget.month);
                          },
                          child: Container(
                            width: 118.w,
                            height: 87.w,
                            decoration: BoxDecoration(
                              color: Colors.white,
                              borderRadius: BorderRadius.circular(23.w)
                            ),
                            alignment: Alignment.center,
                            child: UnconstrainedBox(
                              child: Image.asset("images/post-text.png",width: 41.w,fit: BoxFit.fitWidth,),
                            ),
                          ),
                        ),
                        InkWell(
                          onTap: (){
                            Navigator.of(context).pushReplacementNamed("/post-image",arguments: widget.month);
                          },
                          child: Container(
                            width: 118.w,
                            height: 87.w,
                            decoration: BoxDecoration(
                                color: Colors.white,
                                borderRadius: BorderRadius.circular(23.w)
                            ),
                            alignment: Alignment.center,
                            child: UnconstrainedBox(
                              child: Image.asset("images/post-image.png",width: 41.w,fit: BoxFit.fitWidth,),
                            ),
                          ),
                        )
                      ],
                    ),Divider(height: 15.w,color: Colors.transparent,),
                    Row(
                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
                      children: [
                        InkWell(
                          onTap: (){
                            Navigator.of(context).pushReplacementNamed("/post-voice",arguments: widget.month);
                          },
                          child: Container(
                            width: 118.w,
                            height: 87.w,
                            decoration: BoxDecoration(
                                color: Colors.white,
                                borderRadius: BorderRadius.circular(23.w)
                            ),
                            alignment: Alignment.center,
                            child: UnconstrainedBox(
                              child: Image.asset("images/post-voice.png",width: 41.w,fit: BoxFit.fitWidth,),
                            ),
                          ),
                        ),

                      ],
                    ),
                    Divider(height: 19.w,color: Colors.transparent,),
                    InkWell(
                      child: Container(
                      width: 165.w,
                      height: 39.w,
                      decoration: const BoxDecoration(
                        image: DecorationImage(
                          image: AssetImage("images/home-save-button-bg.png"),
                            fit: BoxFit.fill
                        )
                      ),
                      alignment: Alignment.center,
                      child: StrokeText(text:"publish",strokeColor: Colors.white,strokeWidth: 1.w,textStyle:TextStyle(

                        fontSize: 12.sp,
                        fontWeight: FontWeight.bold,
                        color: Color(0xFF333333)
                      ),),
                    ),)
                  ],
                ),
              ),
              )
            ],
          ))
        ],)
      ),
    );
  }

}